package action;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import domain.Info;
import service.InfoService;

/**
 * Created by liuenming on 2019/11/2.
 */
public class InfoAction extends ActionSupport implements ModelDriven<Info> {

    private Info info = new Info();

    private InfoService infoService;

    public void setInfoService(InfoService infoService) {
        this.infoService = infoService;
    }

    @Override
    public Info getModel() {
        return info;
    }

    public void save(){
        System.out.println("action.....");
        infoService.save(info);
    }
}
